package cn.sc.summer.calculate.builder;

import cn.sc.summer.calculate.po.SystemInfoDTO;

/**
 * 类名：具体构建者的构建过程配置
 *
 * @author a-xin
 * @date 2023/9/5 14:54
 */
public class SystemInfoBuilderDirector {

    private final SystemInfoBuilder builder;

    public SystemInfoBuilderDirector(SystemInfoBuilder builder) {
        this.builder = builder;
    }

    public SystemInfoDTO build() {
        builder.buildSystemInfo();
        builder.buildCpuInfo();
        builder.buildJavaInfo();
        builder.buildJvmInfo();
        builder.buildPhysicalMemoryInfo();
        builder.buildSpaceInfo();
        return builder.build();
    }

    public SystemInfoDTO buildSpaceInfo() {
        builder.buildSpaceInfo();
        return builder.build();
    }

    public SystemInfoDTO buildSystemInfo() {
        builder.buildSystemInfo();
        return builder.build();
    }

    public SystemInfoDTO buildCpuInfo() {
        builder.buildCpuInfo();
        return builder.build();
    }

    public SystemInfoDTO buildJavaInfo() {
        builder.buildJavaInfo();
        return builder.build();
    }

    public SystemInfoDTO buildJvmInfo() {
        builder.buildJvmInfo();
        return builder.build();
    }

    public SystemInfoDTO buildPhysicalMemoryInfo() {
        builder.buildPhysicalMemoryInfo();
        return builder.build();
    }

}


